<?php

namespace App\Evaluation\Controllers;

use App\Http\Controllers\Controller;
use Encore\Admin\Layout\Column;
use Encore\Admin\Layout\Content;
use Encore\Admin\Layout\Row;
use Encore\Admin\Widgets\Box;

class HomeController extends Controller
{
    public function index(Content $content)
    {
        if (request()->get('_pjax')) {
            return redirect(request()->url());
        }
        return $content
            ->title(config('admin.name'))
            ->description('欢迎您...')->row(function (Row $row) {
                $row->column(8, function (Column $column) {
                    $box = new Box('日历', view('dashboard.calendar'));
                    $box->style('info');
                    $box->solid();
                    $column->append($box);
                });
            });
    }
}
